package com.yl.module.property.domain.dto;


import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yl.common.core.validate.Group;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 资产保养记录表 DTO
 * @author makejava
 * @date 2024-10-23 15:54:16
 */
@Data
@ApiModel(value = "PropertyMaintainAddOrUpdDTO", description = "")
public class PropertyMaintainAddOrUpdDTO implements Serializable {
	private static final long serialVersionUID = -10676528028750462L;

    @ApiModelProperty(value = "资产保养记录表-主键id")
	@NotNull(message = "参数id 不能为空" , groups = {Group.Upd.class })
	@Min(value = 1, message = "参数id 不能为0" , groups = {Group.Upd.class })
    private Long id;

	@ApiModelProperty(value = "资产一级分类id 1家电 2安消 3家具 4构件")
	@NotNull(message = "参数propertyTypeId 不能为空", groups = {Group.Add.class, Group.Upd.class})
	@Min(value = 1, message = "参数propertyTypeId 不能为空", groups = {Group.Add.class, Group.Upd.class})
	private Integer propertyTypeId;

	@ApiModelProperty(value = "按资产分类进行保养的资产分类id 按分类保养此字段才有数据 目前存的是构件三级分类id")
	private Integer propertyTypeIdMaintain;

	@ApiModelProperty(value = "资产id 来源property.id 按资产保养此字段才有数据")
    private Integer propertyId;

	@ApiModelProperty(value = "描述")
	@NotBlank(message = "参数describe 不能为空", groups = { Group.Add.class, Group.Upd.class })
    private String describe;

	@ApiModelProperty(value = "保养时间")
	@NotNull(message = "参数maintainTime 不能为空" , groups = {Group.Add.class, Group.Upd.class})
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime maintainTime;



	@ApiModelProperty(value = "文件 文件id")
	private List<Long> fileIds;


}

